﻿module Enferno.Public.Web.Components.ViewModels.Interfaces {

    export interface IBasketViewModel extends IComponentViewModel {
        getId(): string;
        getItems(): Array<Models.BasketItemModel>;
        getFreights(): Array<Models.BasketItemModel>;
        getPayments(): Array<Models.BasketItemModel>;
        getPromotions(): Array<Models.PromotionModel>;
        getRegisteredDiscountPromotions(): Array<Models.PromotionModel>;
        addRegisteredDiscountPromotion(promotion: Models.PromotionModel);
        clearRegisteredDiscountPromotions();
        getIsOpen(): boolean;
        setIsOpen(isOpen: boolean);
        getIsEditable(): boolean;
        setIsEditable(isEditable: boolean);

        update(basket: Models.BasketModel, basketItemOnQuantityChanged: (newQuantity: number, basketItem: Models.BasketItemModel) => void);
    }

} 